from django.http import JsonResponse

class ApiBase(object):

    @staticmethod
    def res_json(code=0, msg='ok', data={}):
        res = {
            'code': code,
            'msg': msg,
            'data': data
        }
        return JsonResponse(res)
